
using System.Windows.Forms;
using Mistral.Features;

namespace Mistral.ComponentModel
{
	public partial class SimpleTextEditorControl : UserControl
	{
		public SimpleTextEditorControl()
		{
			InitializeComponent();
			_richTextBox.DataBindings.Add( "WordWrap", _checkBoxWordWrap, "Checked" );
			new Feature_TextBox_StandardMenu( _richTextBox ).Activate();
		}

		TextBoxBase TextBoxControl
		{
			get { return _richTextBox; }
		}

		public string TextValue
		{
			get { return TextBoxControl.Text; }
			set { TextBoxControl.Text = value; }
		}
		
		public bool ReadOnly
		{
			set{ TextBoxControl.ReadOnly = value; }
			get{ return TextBoxControl.ReadOnly; }
		}
		
		public bool WordWrap
		{
			set{ TextBoxControl.WordWrap = value; }
			get{ return TextBoxControl.WordWrap; }
		}
	}
}
